﻿# CMakeList.txt: Protocol 的 CMake 项目，在此处包括源代码并定义
# 项目特定的逻辑。
#
cmake_minimum_required (VERSION 3.8)

project(Protocol)

message("CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}")

add_definitions(-DLIBPROTOC_EXPORTS)
# 将源代码添加到此项目的可执行文件。
file(GLOB PROTOCOL_CC ./*.cc)
file(GLOB PROTOCOL_HH ./*.h)

add_library(Protocol SHARED ${PROTOCOL_CC} ${PROTOCOL_HH})
target_link_libraries(Protocol ${PROTOBUF_LIBRARY} ${PROTOBUF_LITE_LIBRARY})

set_target_properties(Protocol PROPERTIES OUTPUT_NAME_DEBUG "Protocol")
set_target_properties(Protocol PROPERTIES PREFIX "")
set_target_properties(Protocol PROPERTIES 
	ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
	RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
	LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

# TODO: 如有需要，请添加测试并安装目标。
